package be.kuleuven.cs.mop.gui.components;


import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JLabel;



public class InfoLabel extends JLabel {
	private static final long serialVersionUID = 1L;
	
	
	public InfoLabel(final String text) {
		super(("<html><body>" + text + "</body></html>"), JLabel.LEFT);
		setFont(new Font(Font.SANS_SERIF, Font.BOLD, 14));
	}
	
	
	
	@Override
	public Dimension getPreferredSize() {
		final Dimension dim = super.getPreferredSize();
		dim.height = Math.min(dim.height, 500);
		return dim;
	}
	
}